[zonotope] added operator+ and renamed center c, [graphics] possibility to choose origin for axes, [ctc] Adding CtcParallelepiped with tests and doc#379
Conversation
|
I forgot that the PR was opened, the graphical update was not supposed to be in it. The python binding of draw_axes requires a fix before the PR is merged. |
|
The issue with the python bindings is now solved. I also added the CtcParallelepiped to this PR. |
| @@ -0,0 +1,45 @@ | |||
| /** | |||
There was a problem hiding this comment.
Instead of creating this specific contractor, you can simply define the method IntervalVector Parallelepiped::operator&(const IntervalVector& x) const as in https://github.com/codac-team/codac/blob/codac2/src/core/domains/paving/codac2_Paving.h#L153-L171
..which enables CtcWrapper specialization for Parallelepiped :
https://github.com/codac-team/codac/blob/codac2/src/core/contractors/codac2_CtcWrapper.h#L32
(and so the CtcParallelepiped.* files are not useful anymore)
The operator& could also be used for other purposes, so it would be nice to have it too.
There was a problem hiding this comment.
I agree with that. I only have a a small question / remark about the & operator.
Since it is "directionnal" would it be possible to define two different operator& ? The intersection of a Parallelepiped and an IntervalVector would give a Parallelepiped, and the interesection of an IntervalVector and a Parallelepiped would give an IntervalVector. Said differently, the type of the first element would prevail.
It would require a minor change in the CtcWrapper, where
x = _y & x;
would become
x = x & _y;
…management of Zonotopes
No description provided.